.class final Lcom/greystripe/sdk/at;
.super Lcom/greystripe/sdk/w;

# interfaces
.implements Landroid/media/MediaPlayer$OnErrorListener;


# instance fields
.field private b:Landroid/app/Activity;

.field private c:Landroid/widget/FrameLayout;

.field private d:Landroid/view/View;

.field private e:Z


# direct methods
.method public constructor <init>(Lcom/greystripe/sdk/c;)V
    .locals 1

    invoke-direct {p0, p1}, Lcom/greystripe/sdk/w;-><init>(Lcom/greystripe/sdk/c;)V

    const/4 v0, 0x0

    iput-boolean v0, p0, Lcom/greystripe/sdk/at;->e:Z

    return-void
.end method

.method static synthetic a(Lcom/greystripe/sdk/at;)Landroid/widget/FrameLayout;
    .locals 1

    iget-object v0, p0, Lcom/greystripe/sdk/at;->c:Landroid/widget/FrameLayout;

    return-object v0
.end method

.method static synthetic b(Lcom/greystripe/sdk/at;)V
    .locals 8

    iget-object v0, p0, Lcom/greystripe/sdk/at;->c:Landroid/widget/FrameLayout;

    if-eqz v0, :cond_0

    const-string v0, "iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAYAAADE6YVjAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKTWlDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVN3WJP3Fj7f92UPVkLY8LGXbIEAIiOsCMgQWaIQkgBhhBASQMWFiApWFBURnEhVxILVCkidiOKgKLhnQYqIWotVXDjuH9yntX167+3t+9f7vOec5/zOec8PgBESJpHmomoAOVKFPDrYH49PSMTJvYACFUjgBCAQ5svCZwXFAADwA3l4fnSwP/wBr28AAgBw1S4kEsfh/4O6UCZXACCRAOAiEucLAZBSAMguVMgUAMgYALBTs2QKAJQAAGx5fEIiAKoNAOz0ST4FANipk9wXANiiHKkIAI0BAJkoRyQCQLsAYFWBUiwCwMIAoKxAIi4EwK4BgFm2MkcCgL0FAHaOWJAPQGAAgJlCLMwAIDgCAEMeE80DIEwDoDDSv+CpX3CFuEgBAMDLlc2XS9IzFLiV0Bp38vDg4iHiwmyxQmEXKRBmCeQinJebIxN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WZRhjOH36NIMDA/zo6FHGx5/D8zxmZmaYemcKa23XN8taNJtNms0Gqvo3mZ6exlp7uae3d+LAgWGq1Sq+Z3DAZqPBvaUlPM9HVRgeHv5sGqSbrK7e777I4eEaRgXrHGtrdZaWllhbvT+rqs96dJroN2mSTCTJBkEQUOnrBRHKccxXnnzyEb4d0FMu0VMuPVLwJElJ04T1B3VE5LdAujUg3wem7q+skCQJ60nS3W9ul+4G225LNjdJkoSVlWWKovhARCZ37BMR+VXeaj2ztLR4EMBZR0+5jOeZblAe03QAhbWk6SZJmrJ87x6NzcaCqr4KZLuX1gNRPdZsNN67u7Awvm//PvI8J44jwjDEMzsnggPa7YKsldFoNEnTlPsryzQajf+q6jFgbq/1e0dVX8jz1luLd+/+rKdng96+ClEUPZzQiojinKUoOsdElmVsrK+zsbFOURT/UNVfArNf6FoBTlhrX1fVbwVhSBiE+L6PGsVaR7vdAWhlGUVRXBORt0Tk9487jeQL3F3fds79wDl3EBgG+oAEWBThmoi+D1wFWnsF+N8APRZpVpp0/wgAAAAASUVORK5CYII="

    :try_start_0
    new-instance v7, Landroid/widget/ImageButton;

    iget-object v1, p0, Lcom/greystripe/sdk/at;->b:Landroid/app/Activity;

    invoke-direct {v7, v1}, Landroid/widget/ImageButton;-><init>(Landroid/content/Context;)V

    new-instance v1, Landroid/util/DisplayMetrics;

    invoke-direct {v1}, Landroid/util/DisplayMetrics;-><init>()V

    iget-object v2, p0, Lcom/greystripe/sdk/at;->b:Landroid/app/Activity;

    invoke-virtual {v2}, Landroid/app/Activity;->getWindowManager()Landroid/view/WindowManager;

    move-result-object v2

    invoke-interface {v2}, Landroid/view/WindowManager;->getDefaultDisplay()Landroid/view/Display;

    move-result-object v2

    invoke-virtual {v2, v1}, Landroid/view/Display;->getMetrics(Landroid/util/DisplayMetrics;)V

    invoke-static {v0}, Lcom/greystripe/sdk/aq;->a(Ljava/lang/String;)[B

    move-result-object v0

    const/4 v2, 0x0

    array-length v3, v0

    invoke-static {v0, v2, v3}, Landroid/graphics/BitmapFactory;->decodeByteArray([BII)Landroid/graphics/Bitmap;

    move-result-object v0

    iget v1, v1, Landroid/util/DisplayMetrics;->density:F

    new-instance v5, Landroid/graphics/Matrix;

    invoke-direct {v5}, Landroid/graphics/Matrix;-><init>()V

    invoke-virtual {v5, v1, v1}, Landroid/graphics/Matrix;->postScale(FF)Z

    const/4 v1, 0x0

    const/4 v2, 0x0

    invoke-virtual {v0}, Landroid/graphics/Bitmap;->getWidth()I

    move-result v3

    invoke-virtual {v0}, Landroid/graphics/Bitmap;->getHeight()I

    move-result v4

    const/4 v6, 0x1

    invoke-static/range {v0 .. v6}, Landroid/graphics/Bitmap;->createBitmap(Landroid/graphics/Bitmap;IIIILandroid/graphics/Matrix;Z)Landroid/graphics/Bitmap;

    move-result-object v0

    invoke-virtual {v7, v0}, Landroid/widget/ImageButton;->setImageBitmap(Landroid/graphics/Bitmap;)V

    const/4 v0, 0x0

    const/4 v1, 0x0

    const/4 v2, 0x0

    const/4 v3, 0x0

    invoke-virtual {v7, v0, v1, v2, v3}, Landroid/widget/ImageButton;->setPadding(IIII)V

    const/4 v0, 0x0

    invoke-virtual {v7, v0}, Landroid/widget/ImageButton;->setBackgroundDrawable(Landroid/graphics/drawable/Drawable;)V

    new-instance v0, Lcom/greystripe/sdk/au;

    invoke-direct {v0, p0}, Lcom/greystripe/sdk/au;-><init>(Lcom/greystripe/sdk/at;)V

    invoke-virtual {v7, v0}, Landroid/widget/ImageButton;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    iget-object v0, p0, Lcom/greystripe/sdk/at;->c:Landroid/widget/FrameLayout;

    new-instance v1, Lcom/greystripe/sdk/av;

    invoke-direct {v1, p0, v7}, Lcom/greystripe/sdk/av;-><init>(Lcom/greystripe/sdk/at;Landroid/widget/ImageButton;)V

    invoke-virtual {v0, v1}, Landroid/widget/FrameLayout;->post(Ljava/lang/Runnable;)Z

    new-instance v0, Landroid/widget/FrameLayout$LayoutParams;

    const/4 v1, -0x2

    const/4 v2, -0x2

    const/16 v3, 0x30

    invoke-direct {v0, v1, v2, v3}, Landroid/widget/FrameLayout$LayoutParams;-><init>(III)V

    const/16 v1, 0xa

    iput v1, v0, Landroid/widget/FrameLayout$LayoutParams;->topMargin:I

    const/16 v1, 0xa

    iput v1, v0, Landroid/widget/FrameLayout$LayoutParams;->leftMargin:I

    iget-object v1, p0, Lcom/greystripe/sdk/at;->c:Landroid/widget/FrameLayout;

    invoke-virtual {v1, v7, v0}, Landroid/widget/FrameLayout;->addView(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V
    :try_end_0
    .catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0

    :cond_0
    :goto_0
    return-void

    :catch_0
    move-exception v0

    invoke-virtual {v0}, Ljava/io/IOException;->printStackTrace()V

    goto :goto_0
.end method

.method static synthetic c(Lcom/greystripe/sdk/at;)Landroid/app/Activity;
    .locals 1

    iget-object v0, p0, Lcom/greystripe/sdk/at;->b:Landroid/app/Activity;

    return-object v0
.end method

.method static synthetic d(Lcom/greystripe/sdk/at;)Z
    .locals 1

    const/4 v0, 0x1

    iput-boolean v0, p0, Lcom/greystripe/sdk/at;->e:Z

    return v0
.end method


# virtual methods
.method protected final a()V
    .locals 0

    invoke-virtual {p0}, Lcom/greystripe/sdk/at;->onVideoExit()V

    invoke-virtual {p0}, Lcom/greystripe/sdk/at;->removeVideoView()V

    return-void
.end method

.method public final clearReferences()V
    .locals 2

    const/4 v1, 0x0

    iget-object v0, p0, Lcom/greystripe/sdk/at;->a:Lcom/greystripe/sdk/y;

    invoke-virtual {v0, p0}, Lcom/greystripe/sdk/y;->b(Lcom/greystripe/sdk/x;)V

    iput-object v1, p0, Lcom/greystripe/sdk/at;->a:Lcom/greystripe/sdk/y;

    iput-object v1, p0, Lcom/greystripe/sdk/at;->b:Landroid/app/Activity;

    iput-object v1, p0, Lcom/greystripe/sdk/at;->c:Landroid/widget/FrameLayout;

    iput-object v1, p0, Lcom/greystripe/sdk/at;->d:Landroid/view/View;

    return-void
.end method

.method public final onCompletion()V
    .locals 1

    invoke-super {p0}, Lcom/greystripe/sdk/w;->onCompletion()V

    new-instance v0, Lcom/greystripe/sdk/ax;

    invoke-direct {v0, p0}, Lcom/greystripe/sdk/ax;-><init>(Lcom/greystripe/sdk/at;)V

    invoke-static {v0}, Lcom/greystripe/sdk/bm;->a(Ljava/lang/Runnable;)Z

    return-void
.end method

.method public final onError(Landroid/media/MediaPlayer;II)Z
    .locals 2

    const-string v0, "Video cannot be played."

    const/4 v1, 0x0

    new-array v1, v1, [Ljava/lang/Object;

    invoke-static {v0, v1}, Lcom/greystripe/sdk/bd;->b(Ljava/lang/String;[Ljava/lang/Object;)V

    invoke-virtual {p0}, Lcom/greystripe/sdk/at;->a()V

    const/4 v0, 0x1

    return v0
.end method

.method public final play(Ljava/lang/String;)V
    .locals 1
    .annotation runtime Landroid/webkit/JavascriptInterface;
    .end annotation

    new-instance v0, Lcom/greystripe/sdk/aw;

    invoke-direct {v0, p0, p1}, Lcom/greystripe/sdk/aw;-><init>(Lcom/greystripe/sdk/at;Ljava/lang/String;)V

    invoke-static {v0}, Lcom/greystripe/sdk/bm;->a(Ljava/lang/Runnable;)Z

    return-void
.end method

.method public final removeVideoView()V
    .locals 2

    iget-boolean v0, p0, Lcom/greystripe/sdk/at;->e:Z

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/greystripe/sdk/at;->a:Lcom/greystripe/sdk/y;

    invoke-virtual {v0}, Lcom/greystripe/sdk/y;->stopPlayback()V

    const/4 v0, 0x0

    iput-boolean v0, p0, Lcom/greystripe/sdk/at;->e:Z

    iget-object v0, p0, Lcom/greystripe/sdk/at;->c:Landroid/widget/FrameLayout;

    invoke-virtual {v0}, Landroid/widget/FrameLayout;->removeAllViews()V

    iget-object v0, p0, Lcom/greystripe/sdk/at;->c:Landroid/widget/FrameLayout;

    iget-object v1, p0, Lcom/greystripe/sdk/at;->d:Landroid/view/View;

    invoke-virtual {v0, v1}, Landroid/widget/FrameLayout;->addView(Landroid/view/View;)V

    :cond_0
    return-void
.end method

.method public final setActivity(Landroid/app/Activity;)V
    .locals 1

    iput-object p1, p0, Lcom/greystripe/sdk/at;->b:Landroid/app/Activity;

    new-instance v0, Lcom/greystripe/sdk/y;

    invoke-direct {v0, p1}, Lcom/greystripe/sdk/y;-><init>(Landroid/content/Context;)V

    iput-object v0, p0, Lcom/greystripe/sdk/at;->a:Lcom/greystripe/sdk/y;

    iget-object v0, p0, Lcom/greystripe/sdk/at;->a:Lcom/greystripe/sdk/y;

    invoke-virtual {v0, p0}, Lcom/greystripe/sdk/y;->a(Lcom/greystripe/sdk/x;)V

    return-void
.end method

.method public final setRootLayout(Landroid/widget/FrameLayout;)V
    .locals 2

    iput-object p1, p0, Lcom/greystripe/sdk/at;->c:Landroid/widget/FrameLayout;

    iget-object v0, p0, Lcom/greystripe/sdk/at;->c:Landroid/widget/FrameLayout;

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Landroid/widget/FrameLayout;->getChildAt(I)Landroid/view/View;

    move-result-object v0

    iput-object v0, p0, Lcom/greystripe/sdk/at;->d:Landroid/view/View;

    return-void
.end method

.method public final videoStarted()Z
    .locals 1
    .annotation runtime Landroid/webkit/JavascriptInterface;
    .end annotation

    iget-boolean v0, p0, Lcom/greystripe/sdk/at;->e:Z

    return v0
.end method
